package design.patterns.factorymode.factoryabstract.computer;

/**
 * @Desc:
 * @author: cww
 * @DateTime: 2020-06-08 16:04
 */

public class PcProducer extends ComputerProducer {
    /**
     * 饿汉单例
     */
    private static PcProducer pcProducer = new PcProducer();

    /**
     * 构造函数私有化
     */
    private PcProducer() {
    }

    public static ComputerProducer getInstance() {
        return pcProducer;
    }

    public PcCpu getCpu() {
        return new PcCpu();
    }

    public PcRam getRam() {
        return new PcRam();
    }
}
